﻿//-----------------------------------------------------------------------
// <copyright>
// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
// </copyright>
//----------------------------------------------------------------------- 
using System.IO;
using System.Xml;

namespace Fulcrum.UnitTests.ControlGenerator
{
    static class XmlTestHelp
    {

        public static XmlReader CreateXmlReader(string xml)
        {
            var reader = new StringReader(xml);

            XmlReaderSettings readerSettings = new XmlReaderSettings();
            readerSettings.IgnoreWhitespace = true;
            readerSettings.IgnoreComments = true;

            var xmlReader = XmlReader.Create(reader, readerSettings);

            xmlReader.MoveToContent();

            return xmlReader;
        }
    }
}
